package com.property.demo.repository;

import com.property.demo.model.Activity;
import com.property.demo.model.Community;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ActivityRepository extends JpaRepository<Activity, Long>, JpaSpecificationExecutor<Activity> {

    List<Activity> findByTitleContaining(String title);

    List<Activity> findByStatus(String status);

    List<Activity> findByCommunity(Community community);

    List<Activity> findByCommunityId(Long communityId);

}
